package org.kele.k8s.sc2020.provider.uitl;

import org.kele.k8s.sc2020.provider.entity.Employee;
import org.kele.k8s.sc2020.vo.EmployeeDTO;
import org.springframework.beans.BeanUtils;

public final class EmployeeTransfer {

    public static EmployeeDTO convertToDTO(Employee source) {
        if (source == null) return null;
        EmployeeDTO dto = new EmployeeDTO();
        BeanUtils.copyProperties(source, dto);
        return dto;
    }
}
